package com.ruoyi.sales.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sales.domain.ZcSalesProducts;
import com.ruoyi.sales.domain.ZcStoreEnter;
import com.ruoyi.sales.mapper.ZcSalesProductsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sales.mapper.ZcStoreProductMapper;
import com.ruoyi.sales.domain.ZcStoreProduct;
import com.ruoyi.sales.service.IZcStoreProductService;

/**
 * 成品仓库Service业务层处理
 *
 * @author woo
 * @date 2024-04-12
 */
@Service
public class ZcStoreProductServiceImpl extends ServiceImpl<ZcStoreProductMapper, ZcStoreProduct> implements IZcStoreProductService {
    @Autowired
    private ZcStoreProductMapper zcStoreProductMapper;
    @Autowired
    private ZcSalesProductsMapper zcSalesProductsMapper;

    /**
     * 查询成品仓库
     *
     * @param id 成品仓库主键
     * @return 成品仓库
     */
    @Override
    public ZcStoreProduct selectZcStoreProductById(Long id) {
        return zcStoreProductMapper.selectZcStoreProductById(id);
    }

    /**
     * 查询成品仓库列表
     *
     * @param zcStoreProduct 成品仓库
     * @return 成品仓库
     */
    @Override
    public List<ZcStoreProduct> selectZcStoreProductList(ZcStoreProduct zcStoreProduct) {
        return zcStoreProductMapper.selectZcStoreProductList(zcStoreProduct);
    }

    /**
     * 新增成品仓库
     *
     * @param zcStoreProduct 成品仓库
     * @return 结果
     */
    @Override
    public int insertZcStoreProduct(ZcStoreProduct zcStoreProduct) {
                zcStoreProduct.setCreateTime(DateUtils.getNowDate());
            return zcStoreProductMapper.insertZcStoreProduct(zcStoreProduct);
    }

    /**
     * 修改成品仓库
     *
     * @param zcStoreProduct 成品仓库
     * @return 结果
     */
    @Override
    public int updateZcStoreProduct(ZcStoreProduct zcStoreProduct) {
                zcStoreProduct.setUpdateTime(DateUtils.getNowDate());
        return zcStoreProductMapper.updateZcStoreProduct(zcStoreProduct);
    }

    /**
     * 批量删除成品仓库
     *
     * @param ids 需要删除的成品仓库主键
     * @return 结果
     */
    @Override
    public int deleteZcStoreProductByIds(Long[] ids) {
        return zcStoreProductMapper.deleteZcStoreProductByIds(ids);
    }

    /**
     * 删除成品仓库信息
     *
     * @param id 成品仓库主键
     * @return 结果
     */
    @Override
    public int deleteZcStoreProductById(Long id) {
        return zcStoreProductMapper.deleteZcStoreProductById(id);
    }


}